package com.xcity.pomelo.push.msg;

import java.util.List;

import com.xcity.db.entity.Player;
import com.xcity.game.activity2.share.action.QQShareAction;
import com.xcity.game.activity2.share.template.QQShareActivityTemplate;
import com.xcity.game.item.ItemInfo;
import com.xcity.pomelo.PomeloRoute;
import com.xcity.pomelo.push.AbstractMessagePush;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.PUSH, route = PomeloRoute.PUSH_MESSAGE)
public class QQSharePush extends AbstractMessagePush {
	
	// 分享任务id
	public int id;
	// 分享任务名称
	public String name;
	// 分享任务奖励现金
	public int gold;
	// 分享任务奖励钻石
	public int stone;
	// 分享任务奖励物品
	public List<ItemInfo> items;
	// 状态（0-未分享不能领奖，1-可领奖，2-已领奖）
	public byte state;
	// 已领奖次数
	public int count;
	// 最多可领奖次数
	public int maxCount;

	public QQSharePush(QQShareActivityTemplate template, Player player, byte state) {
		super(MSG_QQ_SHARE);
		this.id = template.getId();
		this.name = template.getName();
		this.gold = template.getGold();
		this.stone = template.getStone();
		this.items = template.getItemList();
		this.state = state;
		this.count = QQShareAction.getSharedCount(player, template);
		this.maxCount = QQShareAction.getMaxCount(template);
	}


}
